package com.auxgroup.hr.front.service.personnal.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

import com.auxgroup.hr.front.dao.domain.PsCountryTbl;
import com.auxgroup.hr.front.dao.repository.PsCountryTblRepository;
import com.auxgroup.hr.front.service.personnal.CountryTblService;

/** 
 * @author wangchangyun
 * @version 创建时间：180527 
 * 社保公积金service
 */
@Service("countryTblService")
public class CountryTblServiceImpl implements CountryTblService {
	
	@Autowired
	private PsCountryTblRepository PsCountryTblRepository;


	@Override
	@Cacheable(value="COUNTRY_VALUE",key="#country")
	public PsCountryTbl getCountryTbl(String country) {
		return PsCountryTblRepository.findOne(country);
	}
	
	
	@Override
	@Cacheable(value="COUNTRY_LIST")
	public List<PsCountryTbl> getAll() {
		PsCountryTbl CountryTbl = new PsCountryTbl();
		return PsCountryTblRepository.findAll(Example.of(CountryTbl));
	}


	
	
	
}
